package net.xdclass.feign;

import net.xdclass.request.LockProductRequest;
import net.xdclass.until.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "xdclass-product-service")
public interface ProductFeignService {
    /**
     * 获取购物车 商品最新价格信息
     *
     * @param productIdList
     * @return
     */
    @PostMapping("/api/cart/v1/comfirm_order_cart_items")
    JsonData confirmOrderCartItem(@RequestBody List<Long> productIdList);

    /**
     * 锁定商品库存
     *
     * @param lockProductRequest
     * @return
     */
    @PostMapping("/api/product/v1/lock_products")
    JsonData lockProductStock(@RequestBody LockProductRequest lockProductRequest);
}
